<script>
    fetch("http://localhost/")
        .then(data => data.text())
        .then(res => console.log(res))
</script>